﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using ProjectB.Core;

namespace ProjectB.Application.System.Services
{
    public class EntityBService : IEntityBService,IScoped
    {
        private readonly IRepository<EntityB, BDbContextLocator> _repository;
        public EntityBService(IRepository<EntityB, BDbContextLocator> repository)
        {
            _repository = repository;
        }
        public async Task<int> Insert(string xx)
        {
            EntityB ee = new() { AProperty = xx };
            var res = await _repository.InsertNowAsync(ee);
            return res.Entity.Id;
        }
    }
}
